package com.serviceImpl;

import com.mapper.TeacherMapper;
import com.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: 张波
 * @Time: 2025/8/20 17:35
 */
@Service("TeacherService")
public class TeacherServiceImpl implements TeacherService {

	@Autowired
	private TeacherMapper teacherMapper;
	/// 转账方法
	@Transactional
	@Override
	public void TransferOneByOne() {
		teacherMapper.UpdateAddMoneyById(1,50);
		System.out.println(1/0);
		teacherMapper.UpdateSubMoneyById(2,50);
	}
}
